package cn.itcast.bos.service.delivery;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.delivery.Promotion;
import cn.itcast.bos.domain.pageBean.PageBean;

public interface IPromotionService {

	void save(Promotion model);

	Page<Promotion> findPageData(Pageable pageable);
	
	@Path("/pageShow")
	@GET
	@Produces({"application/xml", "application/json"})
	PageBean<Promotion> findPageDate(
			@QueryParam("page") int page,
			@QueryParam("rows") int rows);
	
	@Path("/promotion/{id}")
	@GET
	@Produces({"application/xml", "application/json"})
	Promotion findById(@PathParam("id") Integer id);

}
